# _*_ coding: utf-8 _*_
# @Date: 2020/9/14 10:10
# @Author: 刘利 18603013656
# @File: get_company.py
# @Software: PyCharm

import sqlite3


def get_names():
    """从数据库中获取公司名"""
    con = sqlite3.connect('d:/Projects/spider_51job_WeakManager/spider_51job_company/company.db')
    cur = con.cursor()
    data = cur.execute('select company from Interior_Design').fetchall()
    names = []
    for i in range(len(data)):
        names.append(data[i][0])
    cur.close()
    con.close()
    return names
